class Person12 {
    constructor(name:string) {
        this.name = name
    }
    public name: string;
}

const p2 = new Person12('tt')

console.log(p2.name);

class Person121 {
    constructor(public name: string) {

    }
}
const p3 = new Person121('tt2')

console.log(p3.name);

class Teacher12 extends Person12{
    constructor(public age: number) {
        super('tt3')
    }
}

const p4 = new Teacher12(19)

console.log(p4.age);
